<style lang="scss" scoped>
    .ui-map-get-point {
        .cursor-pointer {
            cursor: pointer;
            &:hover {
                color:#f26202;
            }
        }
    }
</style>
<template>
    <div class="ui-map-get-point">
        <el-input placeholder="请标注地理位置" v-model="value.address">
            <i slot="suffix" class="el-input__icon el-icon-location-outline cursor-pointer" @click="openMap"></i>
        </el-input>
    </div>
</template>
<script>
    export default {
        name:'ui-map-get-point',
        props:{
            value:{
                type:Object
            },
            initMark:{
                type:Boolean,
                default:false
            },
            initPoint: {
                type:Object
            }
        },
        data() {
            return {

            }
        },
        mounted() {
            this.$on('global:ui_map_confirm', (data) => {
                this.$emit('input', data);
            });
        },
        watch:{

        },
        methods:{
            openMap() {
                this.$bui.drawer({
                    comp:() => import('./ui-map.vue'),
                    params:{
                        data: this.value,
                        initMark: this.initMark,
                        initPoint: this.initPoint
                    },
                })
                //
            }
        }
    }
</script>

